package com.hxd.otc.common.enums;

/**
 * Created by lzy on 2018/12/15 0015.
 * description ${便民服务状态枚举}
 */
public enum ConvenienceModuleStatusEnum {
    OPENED("1", "已开通"), DISABLED("2", "已禁用"), TO_BE_OPENED("3", "待开通");

    private final String mValue;
    private final String mDesc;

    ConvenienceModuleStatusEnum(String value, String desc) {
        mValue = value;
        mDesc = desc;
    }

    public String getValue() {
        return mValue;
    }

    public String getDesc() {
        return mDesc;
    }

    public static ConvenienceModuleStatusEnum getInstance(String value) {
        for (ConvenienceModuleStatusEnum statusEnum : ConvenienceModuleStatusEnum.values()) {
            if (statusEnum.getValue().equals(value)) return statusEnum;
        }
        return TO_BE_OPENED;
    }

    @Override
    public String toString() {
        return "ConvenienceModuleStatusEnum{" +
                "mValue=" + mValue +
                ", mDesc='" + mDesc + '\'' +
                '}';
    }
}
